package day12;

import java.util.HashSet;
import java.util.Iterator;

public class TestHashSetString {
	public static void main(String[] args) {
		String s1 = new String("aaa");
		String s2 = new String("bbb");
		String s3 = new String("aaa");
		System.out.println(s1==s3);
		System.out.println(s1.equals(s3));
		HashSet hs = new HashSet();
		hs.add(s1);
		hs.add(s2);
		hs.add(s3);
		Iterator it = hs.iterator();
		while(it.hasNext()){
			System.out.println(it.next());
		}
	}
}
